<template>
	<view>
		<mytabs :listF='list1' :listS='list2'  @bigtabchange='bigtabchange' @changcurrent='changcurrent' :bigcurrent='bigcurrent' :current='current'></mytabs>
		<swiperitem @changeswiper='changeswiper' :bigcurrent='bigcurrent' :current='current' :swiperlist='list2'></swiperitem>
	</view>
</template>

<script>
	import mytabs from '../../components/mytabs.vue';
	import swiperitem from '../../components/swiperitem.vue';
	export default {
		components:{
			mytabs,
			swiperitem
		},
		data() {
			return {
				current:0,
				bigcurrent:0,
				list1:[{name:'代取',id:1},{name:'代寄',id:2}],
				list2:[{name:'待取件',id:-1},{name:'已取件',id:0},{name:'已送达',id:1},{name:'取件失败',id:2}],
			};
		},
		onLoad(option) {
			if(option.type==1){
				this.bigcurrent = 1
			}
		},
		methods:{
			//子传父的值
			changcurrent(e){
				this.current = e
				
				uni.$emit('studentsmalltab',e)
			},
			changeswiper(e){
				this.current = e
			},
			bigtabchange(e){
				this.bigcurrent = e
				
				uni.$emit('studentbigtab',e)
			},
		}
	}
</script>

<style lang="scss">

</style>
